home *** CD-ROM | disk | FTP | other *** search
- Path: oxy.rust.net!usenet
- From: ebennett@rust.net
- Newsgroups: comp.lang.c
- Subject: Re: Linker ERROR: BC4 -- HELP!!!
- Date: Wed, 17 Jan 1996 05:58:11 GMT
- Organization: Rust Net - High Speed Internet in Detroit 810-642-2276
- Message-ID: <4dhoij$ioj@oxy.rust.net>
- References: <4denut$2k9@lastactionhero.rs.itd.umich.edu>
- NNTP-Posting-Host: liv-10.rust.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- mschunde@umich.edu (Mark Schunder) wrote:
-
-
- >Here is the error I'm getting when i compile my project under BC4:
-
- >Linker Error: _uiKey defined in module KEYBOARD.C is duplicated in
- >module MAIN.C
-
- >KeybTaskHandle and uiKey are suppose to be global varaibles. uiKey is
- >accessed by two different c files : Keyboard.c (this file updates
- >uiKey with the ascii when the user presses a key on the keyboard) and
- >main.c (this file monitors uiKey, when it changes, it repaints the
- >screen according to the value of uiKey).
-
- >I do not know why I'm getting these errors. I have the keyboard.c
- >header file included in both KEYBOARD.c and MAIN.C (so both sets of
- >files can see the variable and read and update the variables
- >accordingly).
-
- The header file should contain an extern declaration for uiKey and
- KeybTaskHandle. The actual declarations of the variables should be in
- one and only one source file. Assuming uiKey is an int, put the
- following statement in the header file:
-
- extern int uiiKey;
-
- and the following statement in one and only one source file at file
- scope level:
-
- int uiKey;
-
- Earl
-
-
-